Txt2Site Website Builder

Txt2Site Examples

Example 1: one root and a few applications

Suppose we want three applications with one root directory.
Define three configuration files and define the system directories as follows:

content_dir include_dir template_dir target_dir
my_demo1/content my_demo1/include my_demo1/templates site/my_demo1
my_demo2/content my_demo2/include my_demo2/templates site/my_demo2
my_demo3/content my_demo3/include my_demo3/templates site/my_demo3

Then the resulting overall application structure is:


Example 2: showing content files

Showing content files on the website.
This can be done by making the content directory part of the include directory.
For example you can specify in the config file:

Making a link to the content file of the current page you can write the following line in the content file with format txt2tags:

  [Link to contentfile ${path_to_root}include/content${page_source}] 

This works only if path of the link has no spaces (insufficiency of txt2tags). If it has spaces you can use an alternative with pure HTML code:

  <a href="${path_to_root}include/content${page_source}" > Link to contentfile </a> 

Try the link to the contentfile here .

This is applied for this site: for every page you find a link at the bottom to view the contentfile of the page.

Example 3: post-processing statements txt2tags

In the configuration area of txt2tags, you can use post-processing statements. We recommend three usefull post-processing functionality.

  1. A newline in the text can be forced by typing @@.
  2. A dollar can be displayed by typing D_. This has to be done to display a bash command without executing it.
  3. Simple HTML code can be inserted by using double curly brackets for the delimiters < and >.

For example:

In the latest versions of txt2tags you can use tagged output to insert HTML code. For example use double quotation marks ' ' around words to get tagged output. This is a better alternative for the double curly brackets.

^ View Contentfile
© 2013 Arthur Kalverboer Powered by Txt2Site Last changed: 2013-12-21 11:37